import React from 'react';
import { REGION_TYPES } from '../utils/constant';
import TimeSeriesRegion from './TimeSeries';
import RzTimeSeries from '../core/RzTimeSeries';
import { ITimeSeriesProps } from '../utils/types';

interface ILabelToolProps extends ITimeSeriesProps {
  type: string;
}

const LabelTool = (props: ILabelToolProps) => {
  const { type } = props;
  return (
    <>
      {type === REGION_TYPES.TIME_SERIES && <TimeSeriesRegion {...props} />}
      {type === REGION_TYPES.RZ_TIME_SERIES && <RzTimeSeries {...props} />}
    </>
  );
};

export default LabelTool;
